﻿namespace WLFramework.Validation
{
    using WLFramework.Reflection.Metadata;
    
    public class ValidateContext
    {
        public ValidateContext(ModelMetadata metadata, string memberName)
        {
            this.Metadata = metadata;
            this.MemberName = memberName;
            this.DisplayName = this.Metadata.GetMemberDisplayName(this.MemberName);
        }

        public ValidateContext(ModelMetadata metadata, ModelMemberInfo member)
        {
            this.MemberName = member.MemberName;
            this.Metadata = metadata;
            this.DisplayName = member.DisplayName;
        }

        public string DisplayName { get; set; }
        public string MemberName { get; set; }
        public ModelMetadata Metadata { get; set; }
    }
}
